package net.jwtools.tmt.domain;

public class Area {
	private static final long serialVersionUID = 1L;

	/* [CONSTRUCTOR MARKER BEGIN] */
	public Area() {
	}

	/**
	 * Constructor for primary key
	 */
	public Area(java.lang.Long id) {
	}

	public static String REF = "Area";
	public static String PROP_NAME = "Name";
	public static String PROP_MAP = "Map";
	public static String PROP_ID = "Id";

	protected void initialize() {
	}

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String name;
	private java.sql.Blob map;

	/**
	 * Return the unique identifier of this class
	 * 
	 * @hibernate.id generator-class="sequence" column="ID"
	 */
	public java.lang.Long getId() {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * 
	 * @param id
	 *            the new ID
	 */
	public void setId(java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
	 * Return the value associated with the column: NAME
	 */
	public java.lang.String getName() {
		return name;
	}

	/**
	 * Set the value related to the column: NAME
	 * 
	 * @param name
	 *            the NAME value
	 */
	public void setName(java.lang.String name) {
		this.name = name;
	}

	/**
	 * Return the value associated with the column: MAP
	 */
	public java.sql.Blob getMap() {
		return map;
	}

	/**
	 * Set the value related to the column: MAP
	 * 
	 * @param map
	 *            the MAP value
	 */
	public void setMap(java.sql.Blob map) {
		this.map = map;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof net.jwtools.tmt.domain.Area))
			return false;
		else {
			net.jwtools.tmt.domain.Area area = (net.jwtools.tmt.domain.Area) obj;
			if (null == this.getId() || null == area.getId())
				return false;
			else
				return (this.getId().equals(area.getId()));
		}
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId())
				return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":"
						+ this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

	public String toString() {
		return super.toString();
	}

	/* [CONSTRUCTOR MARKER END] */

}